package com.hsxc.cdz.monitor.handler;

import com.hsxc.cdz.monitor.bean.second.SecMessage;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class SecInHandler extends ChannelInboundHandlerAdapter {

	@Override
	public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
		super.channelRead(ctx, msg);
		if(msg instanceof SecMessage){
			SecMessage secMessage = (SecMessage)msg;
			secMessage.execute();
		}else{
			ctx.fireChannelRead(msg);
		}
	}
	
}
